﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace ProjectManager.User.Model
{
    public class AuthInfo
    {
        private bool m_islogin;//是否已登录
        private string m_userid = String.Empty;//用户ID
        private string m_token = String.Empty;//用户凭证
        private string m_username = String.Empty;//登录名
        private string m_realname = String.Empty;//用户姓名
        private string m_roleid = String.Empty;//用户角色ID
        private string m_rolename = String.Empty;//用户角色名称
        private string m_departid = String.Empty;//用户部门ID
        private string m_departname = String.Empty;//用户部门名称
        private string m_departs = String.Empty;//部门权限
        private short m_isadmin;//是否是管理员

        /// <summary>
        /// 是否已登录
        /// </summary>
        public bool islogin
        {
            get { return m_islogin; }
            set { m_islogin = value; }
        }

        /// <summary>
        /// 用户ID
        /// </summary>
        public string userid
        {
            get { return m_userid; }
            set { m_userid = value; }
        }

        /// <summary>
        /// 凭证
        /// </summary>
        public string token
        {
            get { return m_token; }
            set { m_token = value; }
        }

        /// <summary>
        /// 登录名
        /// </summary>
        public string username
        {
            get { return m_username; }
            set { m_username = value; }
        }

        /// <summary>
        /// 登录名
        /// </summary>
        public string realname
        {
            get { return m_realname; }
            set { m_realname = value; }
        }

        /// <summary>
        /// 用户角色ID
        /// </summary>
        [JsonIgnore]
        public string roleid
        {
            get { return m_roleid; }
            set { m_roleid = value; }
        }

        /// <summary>
        /// 用户角色名称
        /// </summary>
        [JsonIgnore]
        public string rolename
        {
            get { return m_rolename; }
            set { m_rolename = value; }
        }

        /// <summary>
        /// 用户部门ID
        /// </summary>
        public string departid
        {
            get { return m_departid; }
            set { m_departid = value; }
        }

        /// <summary>
        ///用户部门名称
        /// </summary>
        public string departname
        {
            get { return m_departname; }
            set { m_departname = value; }
        }

        /// <summary>
        /// 部门权限
        /// </summary>
        [JsonIgnore]
        public string departs
        {
            get { return m_departs; }
            set { m_departs = value; }
        }

        /// <summary>
        /// 是否是管理员
        /// </summary>
        public short isadmin
        {
            get { return m_isadmin; }
            set { m_isadmin = value; }
        }
    }
}
